package com.ysd.util;

/**
 * @program: server_lis
 * @author: liuQi
 * @create: 2023-10-30 17:44
 */
public class PropertySlash {
    /**
     * 获取当前系统
     *
     * @return
     */
    public static String getImagePath() {
        String osName = System.getProperty("os.name");
        String lowerCaseOS = osName.toLowerCase().replaceAll("\\s", "");
        if (lowerCaseOS.contains("win")) {
            return "/image/**";
        } else if (lowerCaseOS.contains("nix") || lowerCaseOS.contains("nux")) {
            return "/image/**";
        } else if (lowerCaseOS.contains("mac")) {
            return "/image/**";
        } else {
            return "/image/**";
        }
    }

    public static String getEmrPath() {
        String osName = System.getProperty("os.name");
        String lowerCaseOS = osName.toLowerCase().replaceAll("\\s", "");
        if (lowerCaseOS.contains("win")) {
            return "/wordFile/**";
        } else if (lowerCaseOS.contains("nix") || lowerCaseOS.contains("nux")) {
            return "/wordFile/**";
        } else if (lowerCaseOS.contains("mac")) {
            return "/wordFile/**";
        } else {
            return "/wordFile/**";
        }
    }

    public static String getSlash() {
        String osName = System.getProperty("os.name");
        String lowerCaseOS = osName.toLowerCase().replaceAll("\\s", "");
        if (lowerCaseOS.contains("win")) {
            return "\\";
        } else if (lowerCaseOS.contains("nix") || lowerCaseOS.contains("nux")) {
            return "/";
        } else if (lowerCaseOS.contains("mac")) {
            return "/";
        } else {
            return "/";
        }
    }

}
